In [1]:
push!(LOAD_PATH, "C:\\Users\\Ben\\Documents\\Programs\\log1\\julia")
using PyPlot
using Sum
using When
In [2]:
Σ([1,2,3])
Out[2]:
Use of $\Sigma$ sum function for plotting:
In [12]:
x = range(0, Σ(range(1,5)))
y = sin(x)
plot(x,y)
Out[12]:
The $\Sigma$ function is defined as follows:
In [ ]:
function Σ(list) # List summation
sum = 0
for i in list
sum = sum + list[i]
end
return sum
end
In [ ]: